**************************************************************************************************************
**	Replication do-file for "Governmment Policies and the Emergence of an Ethnic Dimension in Party Systems"
**	Author: Maayan Mor
**  FIGURE 1
**************************************************************************************************************

clear all
set more off

/* SET DIRECTORY */

use "Catholic Zentrum delegates.dta", replace

twoway (function y=40,range(1848.7 1849.3) recast(area) color(gs11) base(0) ) ///
       (function y=40,range(1851.7 1852.3) recast(area) color(gs11) base(0) ) ///
       (function y=40,range(1860.7 1861.3) recast(area) color(gs11) base(0) ) ///
       (function y=40,range(1866.7 1867.3) recast(area) color(gs11) base(0) ) ///
	   (function y=40,range(1869.7 1870.3) recast(area) color(gs11) base(0) ) ///
	   (function y=40,range(1872.7 1873.3) recast(area) color(gs11) base(0) ) ///
       (scatter share_catholics year if year<1867, connect(direct) m(i) mc(gs1) lc(gs1))  ///
       (scatter share_catholics year  if year>1866, connect(direct) m(i) mc(gs1) lc(gs1) ) ///
	   (scatter share_zentrum year if year<1867 & year>1849, connect(direct) m(i) mc(gs1) lc(gs1)  lp(dash)) ///
	   (scatter share_zentrum year  if year>=1867, connect(direct) m(i) mc(gs1) lc(gs1) lp(dash)) ///
	   , ///
xlabel(1849 1849.5 1852 1855 1858 1861 1862 1863 1866 1867 1867.8 1870 1873 1874,  alternate labsize(4.5)) legend(off) graphregion(color(white)) name(center_lt, replace) title("")  ///
ytitle("% of Delegates", size(5)) ylabel(0(10)40, labsize(4.5)) xtitle("Election Year", size(5)) xsize(9)

/* 
The following labels have been altered manually :
1849         // JANUARY state elections
1849.5 in 2  // JULY state elections
1867         // AUGUST Reichstag elections
1867.8       // AUGUST Reichstag elections
*/
 
graph export "center_pct.png", replace
